home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄25⁄90 / 1342-Dismisser Disagreeme-May90 < prev    next >
Encoding:
Text File  |  1990-05-25  |  2.5 KB  |  62 lines  |  [TEXT/GEOL]

  1. Item    2461229                         25-May-90        11:18PDT
  2.  
  3. From:   MADA2                           MacApp Dev Assoc, Curtis Faith,IVC
  4.  
  5. To:     D4695                           Skywalker Sys, Scott Collins,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Dismisser Disagreement
  10.  
  11. Scott,
  12. You State:
  13.  
  14. "Dismissers don't 'put away' dialogs.  They never have (either modal or
  15. modeless), any more than choosing the quit item call ExitToShell.  Instead quit
  16. sets a semaphore that says 'all done, you clean up and do whatever you have
  17. to'.
  18.     PoseModally uses its semaphore (fDismissed) to note that user has finished
  19. input, it can then do any final validation and finally put the dialog away.
  20. There are many schools of thought on modeless dialogs, whether they can have
  21. buttons that make them go away or if only the close box can do that.  There is
  22. no OK button on a MacWrite document."
  23.  
  24. I am going to DISAGREE with you on this one.
  25.  
  26. In every standard MacApp application, Choosing the quit menu item does the
  27. following:
  28.  
  29. 1) A TQuitCommand is created and returned up the call chain.
  30. 2) The TQuitCommand's Doit method is called which in turn:
  31.     a) CALLS TAPPLICATION.CLOSE and
  32.     b) sets gAppDone to TRUE
  33. 3) gAppDone being TRUE results in the termination of TApplication.MainEventLoop
  34. 4) MainEventLoop terminates and control goes back to TApplication.Run.
  35. 5) TApplication.Run calls some Cleanup stuff.
  36. 6) The program falls out of its main routine, resulting in a call to
  37. ExitToShell.
  38.  
  39.  
  40. You Say: "quit sets a semaphore that says 'all done, you clean up and do
  41. whatever you have to'".
  42.  
  43. This is partially True, Quit directly calls TApplication.Close and Quit is
  44. sending this semaphore to MacApp!  MacApp picks it up and takes care of this
  45. without any intervention on my part.
  46.  
  47. In saying there was a bug my intent is to point out that MacApp should
  48. automatically handle the removal of windows that are closed via a dismisser, in
  49. the same way it automatically handles going from a quit command to ExitToShell.
  50.  
  51. Now whether there should be a dismisser besides the close bow in a modeless
  52. dialog that is another matter.  I tend to think that this is useful at times,
  53. mostly so that users can have there trusy "Cancel" button.  If it looks like a
  54. dialog my users expect a cancel button.
  55.  
  56. Thanks for the modification to RemoveAndFree, funny how I was pointing out how
  57. free calls fSuperView.RemoveSubVIew(SELF) but then forgot that when I replaced
  58. the functionality of FreeAll.
  59.  
  60. - Curtis
  61.  
  62.